<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>duplexHooks</title>
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
        <script src="../avalon.js"></script>
        <script>
            require(["mask/avalon.mask.js"], function() {
                var a = avalon.define({
                    $id: "test",
                    aaa: ""
                })
                a.$watch("aaa", function(v) {
                    // console.log(v)
                })
                avalon.scan()
            })
        </script>
    </head>
    <body ms-controller="test">
        <input  size='30'
                ms-duplex-mask="aaa"
                data-duplex-mask="【99/99其他提示字符9999】"
                data-duplex-mask-clear-if-pristine="false"
                data-duplex-mask-translations ="{
                A: {pattern: /[A-Za-z0-9]/}, 
                S: {pattern: /[A-Za-z]/},  
                Y: {pattern: /[0-9]/}
                }"
                />必须输入数字
 <pre class="brush:html;gutter:false;toolbar:false">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="utf-8"&gt;
        &lt;title&gt;duplexHooks&lt;/title&gt;
        &lt;meta http-equiv="X-UA-Compatible" content="IE=8" /&gt;
        &lt;script src="../avalon.js"&gt;&lt;/script&gt;
        &lt;script&gt;
            require(["mask/avalon.mask.js"], function() {
                avalon.define({
                    $id: "test",
                    aaa: ""
                })
                avalon.scan()
            })
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body ms-controller="test"&gt;
        &lt;input  size='30'
                ms-duplex-mask="aaa"
                data-duplex-mask="【99/99其他提示字符9999】"
                data-duplex-mask-clear-if-pristine="false"
                data-duplex-mask-translations="{
                A: {pattern: /[A-Za-z0-9]/}, 
                S: {pattern: /[A-Za-z]/},  
                Y: {pattern: /[0-9]/}
                }"
                /&gt;必须输入数字

    &lt;/body&gt;
&lt;/html&gt;
        </pre>
    </body>
</html>
